﻿@model IEnumerable<CTM.Web.Models.View.Notification.NotificationViewModel>

@if (Model.Any())
{
    foreach (var notification in Model)
    {
        <tr id="notification-@notification.Id">
            <td><button type="button" class="close" onclick="removeNotification('@notification.Id');"><span class="fa fa-remove"></span></button></td>
            <td><a href="@Url.Action("Redirect", "Notification", new { id = notification.Id })">@notification.CreatedOn.ToString("dd-MMM-yyyy HH:mm") - @Html.Raw(notification.Message)</a></td>
        </tr>
    }
}
else
{
    <tr>
        <td>
            <div role="alert" class="alert text-center">
                <h4>You have no new notification.</h4>
            </div>
        </td>
    </tr>
}